NetworkDomain

class NetworkDomain : Domain

Network domain allows tracking network activities of the page. It exposes information about http, file, data and other requests and responses, their headers, bodies, timing, etc.

Functions

canClearBrowserCache
Link copied to clipboard
fun canClearBrowserCache(): Single<CanClearBrowserCacheResponse>
Tells whether clearing browser cache is supported.
canClearBrowserCookies
Link copied to clipboard
fun canClearBrowserCookies(): Single<CanClearBrowserCookiesResponse>
Tells whether clearing browser cookies is supported.
canEmulateNetworkConditions
Link copied to clipboard
fun canEmulateNetworkConditions(): Single<CanEmulateNetworkConditionsResponse>
Tells whether emulation of network conditions is supported.
clearBrowserCache
Link copied to clipboard
fun clearBrowserCache(): Single<RequestResponseFrame>
Clears browser cache.
clearBrowserCookies
Link copied to clipboard
fun clearBrowserCookies(): Single<RequestResponseFrame>
Clears browser cookies.
continueInterceptedRequest
Link copied to clipboard
Response to Network.requestIntercepted which either modifies the request to continue with any modifications, or blocks it, or completes it with the provided response bytes.
dataReceived
Link copied to clipboard
fun dataReceived(): Flowable<DataReceivedEvent>
Fired when data chunk was received over the network.
deleteCookies
Link copied to clipboard
fun deleteCookies(input: DeleteCookiesRequest): Single<RequestResponseFrame>
Deletes browser cookies with matching name and url or domain/path pair.
description
Link copied to clipboard
fun description(): String
Returns domain description.
disable
Link copied to clipboard
fun disable(): Single<RequestResponseFrame>
Disables network tracking, prevents network events from being sent to the client.
emulateNetworkConditions
Link copied to clipboard
fun emulateNetworkConditions(input: EmulateNetworkConditionsRequest): Single<RequestResponseFrame>
Activates emulation of network conditions.
enable
Link copied to clipboard
fun enable(input: EnableRequest): Single<RequestResponseFrame>
Enables network tracking, network events will now be delivered to the client.
events
Link copied to clipboard
fun events(): Flowable<Event>
Returns flowable capturing all domains events.
fun events(filter: Predicate<Event>): Flowable<Event>
Returns flowable capturing all domains events matching predicate.
fun <T : Event> events(eventClass: Class<T>): Flowable<T>
Returns flowable capturing all domain events of a given type.
fun <T : Event> events(eventClass: Class<T>, filter: Predicate<T>): Flowable<T>
Returns flowable capturing all domain events of a given type matching predicate.
eventSourceMessageReceived
Link copied to clipboard
fun eventSourceMessageReceived(): Flowable<EventSourceMessageReceivedEvent>
Fired when EventSource message is received.
getAllCookies
Link copied to clipboard
fun getAllCookies(): Single<GetAllCookiesResponse>
Returns all browser cookies.
getCertificate
Link copied to clipboard
fun getCertificate(input: GetCertificateRequest): Single<GetCertificateResponse>
Returns the DER-encoded certificate.
getCookies
Link copied to clipboard
fun getCookies(input: GetCookiesRequest): Single<GetCookiesResponse>
Returns all browser cookies for the current URL.
getDependencies
Link copied to clipboard
open override fun getDependencies(): List<Domain>
Returns list of dependant domains that should be enabled prior to enabling this domain.
getRequestPostData
Link copied to clipboard
fun getRequestPostData(input: GetRequestPostDataRequest): Single<GetRequestPostDataResponse>
Returns post data sent with the request.
getResponseBody
Link copied to clipboard
fun getResponseBody(input: GetResponseBodyRequest): Single<GetResponseBodyResponse>
Returns content served for the given request.
getResponseBodyForInterception
Link copied to clipboard
Returns content served for the given currently intercepted request.
getSecurityIsolationStatus
Link copied to clipboard
Returns information about the COEP/COOP isolation status.
loadingFailed
Link copied to clipboard
fun loadingFailed(): Flowable<LoadingFailedEvent>
Fired when HTTP request has failed to load.
loadingFinished
Link copied to clipboard
fun loadingFinished(): Flowable<LoadingFinishedEvent>
Fired when HTTP request has finished loading.
loadNetworkResource
Link copied to clipboard
fun loadNetworkResource(input: LoadNetworkResourceRequest): Single<LoadNetworkResourceResponse>
Fetches the resource and returns the content.
name
Link copied to clipboard
fun name(): String
Returns domain name.
replayXHR
Link copied to clipboard
fun replayXHR(input: ReplayXHRRequest): Single<RequestResponseFrame>
This method sends a new XMLHttpRequest which is identical to the original one.
requestIntercepted
Link copied to clipboard
fun requestIntercepted(): Flowable<RequestInterceptedEvent>
Details of an intercepted HTTP request, which must be either allowed, blocked, modified or mocked.
requestServedFromCache
Link copied to clipboard
fun requestServedFromCache(): Flowable<RequestServedFromCacheEvent>
Fired if request ended up loading from cache.
requestWillBeSent
Link copied to clipboard
fun requestWillBeSent(): Flowable<RequestWillBeSentEvent>
Fired when page is about to send HTTP request.
requestWillBeSentExtraInfo
Link copied to clipboard
fun requestWillBeSentExtraInfo(): Flowable<RequestWillBeSentExtraInfoEvent>
Fired when additional information about a requestWillBeSent event is available from the network stack.
resourceChangedPriority
Link copied to clipboard
fun resourceChangedPriority(): Flowable<ResourceChangedPriorityEvent>
Fired when resource loading priority is changed
responseReceived
Link copied to clipboard
fun responseReceived(): Flowable<ResponseReceivedEvent>
Fired when HTTP response is available.
responseReceivedExtraInfo
Link copied to clipboard
fun responseReceivedExtraInfo(): Flowable<ResponseReceivedExtraInfoEvent>
Fired when additional information about a responseReceived event is available from the network stack.
searchInResponseBody
Link copied to clipboard
fun searchInResponseBody(input: SearchInResponseBodyRequest): Single<SearchInResponseBodyResponse>
Searches for given string in response content.
setAttachDebugStack
Link copied to clipboard
fun setAttachDebugStack(input: SetAttachDebugStackRequest): Single<RequestResponseFrame>
Specifies whether to attach a page script stack id in requests
setBlockedURLs
Link copied to clipboard
fun setBlockedURLs(input: SetBlockedURLsRequest): Single<RequestResponseFrame>
Blocks URLs from loading.
setBypassServiceWorker
Link copied to clipboard
fun setBypassServiceWorker(input: SetBypassServiceWorkerRequest): Single<RequestResponseFrame>
Toggles ignoring of service worker for each request.
setCacheDisabled
Link copied to clipboard
fun setCacheDisabled(input: SetCacheDisabledRequest): Single<RequestResponseFrame>
Toggles ignoring cache for each request.
setCookie
Link copied to clipboard
fun setCookie(input: SetCookieRequest): Single<SetCookieResponse>
Sets a cookie with the given cookie data; may overwrite equivalent cookies if they exist.
setCookies
Link copied to clipboard
fun setCookies(input: SetCookiesRequest): Single<RequestResponseFrame>
Sets given cookies.
setDataSizeLimitsForTest
Link copied to clipboard
fun setDataSizeLimitsForTest(input: SetDataSizeLimitsForTestRequest): Single<RequestResponseFrame>
For testing.
setExtraHTTPHeaders
Link copied to clipboard
fun setExtraHTTPHeaders(input: SetExtraHTTPHeadersRequest): Single<RequestResponseFrame>
Specifies whether to always send extra HTTP headers with the requests from this page.
setRequestInterception
Link copied to clipboard
fun setRequestInterception(input: SetRequestInterceptionRequest): Single<RequestResponseFrame>
Sets the requests to intercept that match the provided patterns and optionally resource types.
setUserAgentOverride
Link copied to clipboard
fun setUserAgentOverride(input: SetUserAgentOverrideRequest): Single<RequestResponseFrame>
Allows overriding user agent with the given string.
signedExchangeReceived
Link copied to clipboard
fun signedExchangeReceived(): Flowable<SignedExchangeReceivedEvent>
Fired when a signed exchange was received over the network
takeResponseBodyForInterceptionAsStream
Link copied to clipboard
Returns a handle to the stream representing the response body.
trustTokenOperationDone
Link copied to clipboard
fun trustTokenOperationDone(): Flowable<TrustTokenOperationDoneEvent>
Fired exactly once for each Trust Token operation.
webSocketClosed
Link copied to clipboard
fun webSocketClosed(): Flowable<WebSocketClosedEvent>
Fired when WebSocket is closed.
webSocketCreated
Link copied to clipboard
fun webSocketCreated(): Flowable<WebSocketCreatedEvent>
Fired upon WebSocket creation.
webSocketFrameError
Link copied to clipboard
fun webSocketFrameError(): Flowable<WebSocketFrameErrorEvent>
Fired when WebSocket message error occurs.
webSocketFrameReceived
Link copied to clipboard
fun webSocketFrameReceived(): Flowable<WebSocketFrameReceivedEvent>
Fired when WebSocket message is received.
webSocketFrameSent
Link copied to clipboard
fun webSocketFrameSent(): Flowable<WebSocketFrameSentEvent>
Fired when WebSocket message is sent.
webSocketHandshakeResponseReceived
Link copied to clipboard
Fired when WebSocket handshake response becomes available.
webSocketWillSendHandshakeRequest
Link copied to clipboard
Fired when WebSocket is about to initiate handshake.
webTransportClosed
Link copied to clipboard
fun webTransportClosed(): Flowable<WebTransportClosedEvent>
Fired when WebTransport is disposed.
webTransportConnectionEstablished
Link copied to clipboard
Fired when WebTransport handshake is finished.
webTransportCreated
Link copied to clipboard
fun webTransportCreated(): Flowable<WebTransportCreatedEvent>
Fired upon WebTransport creation.

Sources

jvm source
Link copied to clipboard